<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:forEach items="${fns:getMenuList()}" var="menu" varStatus="idxStatus">
    <c:set var="rootTmp" value="${root}"/>
    <c:if test="${ menu.parent.id eq root && menu.isShow eq '1'}">
        <c:if test="${not empty menu.href}">
            <li >
                <a href="#" data-href="${fn:indexOf(menu.href, '://') eq -1 ? ctx : ''}${menu.href}" onclick="addTab($(this),false)">
                    <i class="icon ion-ios-browsers"></i>
                    <span>${menu.name}</span>
                </a>
            </li>
        </c:if>
        <c:if test="${empty menu.href}">
            <li class="treeview">
            <a href="#">
                <i class="icon ion-ios-browsers"></i>
                <span>${menu.name}</span>
                <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
            </span>
            </a>
            <ul class="treeview-menu">
                <c:set var="root" value="${menu.id}" scope="request"/>
                <jsp:include page="menuTree.jsp"/>
            </ul>
        </c:if>
    </c:if>

    <c:set var="root" value="${rootTmp}"/>
</c:forEach>